﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LedgerDetails.aspx.cs" Culture="en-GB" Inherits="Main_Reports_Accounts_AccountBooks_LedgerDetails" %>

<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Assembly="CalendarExtenderPlus" Namespace="AjaxControlToolkitPlus" TagPrefix="advancedCalender" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Monthly Ledger Details</title>
    <link href="../../../../Styles/accounts.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        function getWidth() {
            document.getElementById("hidChartWidth").value = document.getElementById("grdDisplay").clientWidth;
        }
        function OpenMonthlySummary(lid, lname, fromdate, todate) {
            window.open('../LedgerMonthlySummary.aspx?LID=' + lid + '&LNAME=' + lname + '&FROMDATE=' + fromdate + '&TODATE=' + todate, '', 'height=600,width=900,scrollbars=1,resizable=1,titlebar=1');
            return true;
        }     
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <div style="width: 90%; margin-left: 5%; margin-right: 5%; margin-top: 7px;">
        <asp:HiddenField ID="hidChartWidth" runat="server" Value="0" />
        <asp:HiddenField ID="hidLedgerId" runat="server" />
        <asp:HiddenField ID="hidLedgerName" runat="server" />
        <asp:HiddenField ID="hidFromDate" runat="server" />
        <asp:HiddenField ID="hidToDate" runat="server" />
        
        <asp:Panel ID="panelView" runat="server" Width="100%" Style="margin-top: 5px;">
            <table style="border: solid 1px #818181;" width="97%">
                  <tr>
                    <td style="width: 100%;" class="headtd" align="center">
                        <asp:Label ID="lblHeading" runat="server" Font-Bold="true"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 100%">
                        <asp:GridView ID="grdDisplay" CssClass="gridview" Width="100%" runat="server" OnRowDataBound="grdDisplay_RowDataBound"
                            AutoGenerateColumns="false" ShowFooter="true">
                            <Columns>
                            <asp:TemplateField HeaderText="Month" ItemStyle-Width="25%">
                                <ItemTemplate>
                                   <asp:HyperLink ID="hyperMonth" runat="server" NavigateUrl="#"><%#Eval("MonthName") %></asp:HyperLink> 
                                    <asp:HiddenField ID="hidFromDate" runat="server" Value='<%# Eval("FromDate")%>' />
                                    <asp:HiddenField ID="hidToDate" runat="server" Value='<%# Eval("ToDate")%>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                                <asp:TemplateField HeaderText="Debit" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="25%">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDebit" runat="server" Text='<%# Eval("Debit")%>'></asp:Label>
                                        <asp:HiddenField ID="hidDebit" runat="server" Value='<%# Eval("Debit")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Credit" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="25%">
                                    <ItemTemplate>
                                        <asp:Label ID="lblCredit" runat="server" Text='<%# Eval("Credit")%>'></asp:Label>
                                        <asp:HiddenField ID="hidCredit" runat="server" Value='<%# Eval("Credit")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Balance" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="25%">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBalance" runat="server"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <br />
          <%--  <asp:Chart ID="monthlyChart" runat="server" Visible="false" Width="750" BorderlineWidth="1"
                BorderlineColor="ActiveBorder" Height="200" ToolTip="Monthly Summary" ImageLocation="~/TempImageFiles">
                <Series>
                    <asp:Series Name="Series1" XValueMember="MonthName" YValueMembers="BalanceForChart"
                        Color="#63a83b">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea  Name="ChartArea1">
                        <AxisY Title="Amount">
                        </AxisY>
                        <AxisX  IsLabelAutoFit="true">
                            <LabelStyle Angle="-90" Interval="1" />
                        </AxisX>
                    </asp:ChartArea>
                </ChartAreas>
            </asp:Chart>--%>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
